package com.hgx.scala.start01

class Student(name: String, age: Int) {
  def printInfo(): Unit = {
    println(name + " " + age + " " + Student.school)
  }
}

object Student {
  val school: String = "战争学院"

  def main(args: Array[String]): Unit = {
    val hgx = new Student("hgx", 20)
    val nnna = new Student("nnna", 32)
    hgx.printInfo()
    nnna.printInfo()
  }
}
